home *** CD-ROM | disk | FTP | other *** search
/ Freaks Macintosh Archive / Freaks Macintosh Archive.bin / Freaks Macintosh Archives / Phreaking⁄Wardialers / Phreaking texts / 68060Info.txt < prev    next >
Text File  |  1999-01-28  |  23KB  |  386 lines

  1.  
  2.                         The Motorola 68060 Microprocessor
  3.  
  4.  
  5.                         Joe Circello and Floyd Goodrich
  6.  
  7.                    Microprocessor and Memory Technology Group
  8.                                   Motorola Inc.
  9.  
  10.  
  11. Abstract
  12.  
  13.     The Motorola 68060 is the fourth-generation microprocessor of the 
  14. M68000 Family.  User object code-compatible with previous family members, 
  15. it delivers 3 to 3.5 times the performance of the previous generation 
  16. processor in this family, the 68040.  Performance features include a 
  17. superscalar integer unit, a high-performance floating point unit, dual 
  18. 8-Kbyte on-chip caches, a branch cache, and on-chip memory-management units.  
  19. A streamlined design enables high-performance techniques to achieve a high 
  20. level of parallel instruction execution.  Improved performance at a low 
  21. cost makes the 68060 an ideal processor for the mid to high range of 
  22. desktop computing applications, and compatibility features enable it easily
  23. to upgrade performance of existing 68040-based systems.  This paper 
  24. describes the operation of the 68060.
  25.  
  26. Figure 1 - Simplified 68060 Block Diagram (***NOT SHOWN IN ASCII-ONLY COPY***)
  27.  
  28.  
  29. Introduction and Overview
  30.  
  31.     The 68060 is the fourth-generation microprocessor of Motorola's 
  32. M68000 Family of CISC micro-processors.  It is a single-chip implementation 
  33. that employs a deep pipeline, dual-issue superscalar execution, a branch 
  34. cache, a high performance floating point unit (FPU), 8 Kbytes each of 
  35. on-chip instruction and data caches, on-chip demand paged memory management 
  36. units (MMUs).  These features allow it to achieve execution rates of less 
  37. than one clock per instruction sustained execution. 
  38.     In order to meet the performance goals of the 68060, instruction 
  39. execution times needed to decrease, and parallel operations needed to 
  40. increase over previous generations of M68000 microprocessors.  A superscalar 
  41. instruction dispatch micro-architecture is the most obvious feature of this 
  42. increased parallelism on the 68060.  Superscalar architectures are 
  43. distinguished by their ability to dispatch two or more instructions per clock 
  44. cycle from an otherwise conventional instruction stream.
  45.     Figure 1 shows a block diagram of the 68060.  In addition to the 
  46. superscalar features, this single chip has many other performance, upgrade 
  47. and system integration features including:
  48.     * 100% user-mode object code compatibility with 68040
  49.     * Dual-issue superscalar instruction dispatch implementation of 
  50.       M68000 architecture
  51.     * IEEE Compatible on-chip FPU
  52.     * Branch Cache to minimize pipeline refill latency
  53.     * Separate 8 Kbyte on-chip instruction and data    caches with 
  54.           simultaneous access
  55.     * Bus Snooping
  56.     * 68040 compatible bus protocol or new high-speed bus protocol
  57.     * 32-bit nonmultiplexed address and data bus
  58.     * Four-entry write buffer
  59.     * Concurrent operation of Integer Unit, FPU, MMUs, caches, 
  60.           Bus Controller, and Pipeline
  61.     * Sophisticated power management subsystem
  62.     * Low-power 3.3V operation
  63.     * JTAG Boundary Scan
  64.  
  65. Design Targets
  66.  
  67.     The design goals of the 68060 included providing a simple upgrade 
  68. path for existing M68000 Family designs while also supplying a basis for 
  69. Motorola's successful 68EC0x0 Family of embedded controllers and for the 
  70. 68300 Family of modular integrated controllers.
  71.     Initial requirements for the targeted 68060 were to provide a factor 
  72. of three performance enhancement over a 25 MHz 68040 with existing compiler 
  73. technology.  Architectural enhancements were to provide at least a 50% 
  74. improvement while doubling clock frequency doubles performance.  The 
  75. performance estimates reflect analysis of existing object code; additional 
  76. performance advantages are, of course, available when using compilers 
  77. designed specifically for the 68060.
  78.     In addition to software compatibility, the 68060 preserves the 
  79. investment in board-level ASICs by providing bus compatibility with the 
  80. 68040.  This supersocket approach facilitates upgrade of all existing and 
  81. future 68040-based systems.
  82.     The 68060 uses approximately 2.4 million transistors.  The part is 
  83. a static CMOS design based on a 0.5 um triple level metal wafer process.  
  84. This process will enable the 68060 to operate at a 3.3 volt power supply--
  85. a greater than 50% power reduction over a 5.0 volt power supply.  Since the 
  86. 68060 minimizes power dissipation through a variety of architectural and 
  87. circuit techniques, it is able to offer high performance processing to the 
  88. laptop and portable markets in addition to the traditional computer-system 
  89. markets.
  90.  
  91. Architectural Features
  92.  
  93.     The architecture of the 68060 revolves around its novel integer unit 
  94. pipeline.  Taking advantage of many of the same performance enhancements 
  95. used by RISC designs as well as developing new architectural techniques, 
  96. the 68060 harnesses new levels of performance for the M68000 Family.
  97.     The superscalar micro-architecture actually consists of two distinct 
  98. parts:  a four-stage instruction fetch pipeline (IFP) responsible for 
  99. accessing the instruction stream and dual four-stage operand execution 
  100. pipelines (OEPs) which perform the actual instruction execution.  These 
  101. pipeline structures operate in an independent manner with a FIFO instruction 
  102. buffer providing the decoupling mechanism.  A branch cache minimizes the 
  103. latency effects of change of flow instructions by allowing the IFP to 
  104. detect changes in the instruction prefetch stream well in advance of 
  105. their actual execution by the OEPs.
  106.     The 68060 is a full internal Harvard architecture.  The instruction 
  107. and data caches are designed to support concurrent instruction fetch 
  108. and operand read and operand write references on every clock cycle.  This 
  109. organization coupled with a multi-ported register file provide the 
  110. necessary bandwidth to maximize the throughput of the pipelines.  The 
  111. operand execution pipelines operate in a lock-stepped manner that provides 
  112. simultaneous, but not out-of-order, program execution.  The net result is 
  113. a machine architecture invisible to existing applications providing full 
  114. support of the M68000 programming model including precise exceptions.
  115.     The 68060 external bus interface provides a superset of 68040 
  116. functionality.  Maintaining 32-bit widths on both the address and data 
  117. bus as well as a bursting protocol for cacheable memory, the 68060 supports 
  118. transfers of one, two, four, or 16 bytes in a given bus cycle.  The system 
  119. designer can, however, choose to operate in one of two modes:  a mode 
  120. compatible with the 68040 protocol or a new mode consistent with higher 
  121. frequency bus designs.  By allowing this choice, the 68060 can easily fit 
  122. into upgrades of existing designs as well as new high frequency 
  123. implementations.
  124.  
  125. Pipeline Organization
  126.  
  127.     The IFP is responsible for prefetching instructions and loading them 
  128. into the FIFO instruction buffer.  One key aspect of the design is the branch 
  129. cache, which allows the IFP to detect changes in the instruction stream 
  130. based on past execution history.  This allows the IFP to provide a 
  131. constant stream of instructions to the instruction buffer to maximize 
  132. the execution rates of the OEPs.  The IFP is implemented as a four-stage 
  133. design shown in Figure 2.
  134.  
  135. Figure 2 - The IFP of the 68060 (***NOT SHOWN IN ASCII-ONLY COPY***)
  136.  
  137.         The four stages of the IFP are:  Instruction Address Generation (IAG), 
  138. Instruction Cache (IC), Instruction Early Decode (IED) and Instruction 
  139. Buffer (IB).  The instruction and branch caches are integral components of 
  140. the IFP.
  141.         Four operations can be occurring concurrently in the IFP.  The 
  142. IAG stage calculates the next prefetch address from a number of possible 
  143. sources.  The variable length of the M68000 Family instruction set as well 
  144. as change-of-flow detection make this stage critical to the performance of 
  145. the 68060.  After the IAG sends the appropriate address to the instruction 
  146. cache, the IC stage of the IFP is responsible for performing the cache lookup 
  147. and fetching the bit pattern of the instruction.  The IED stage of the 
  148. pipeline analyzes the bytes fetched from the instruction stream and builds 
  149. an extended operation word.  This lookup stage effectively converts the 
  150. variable-length instruction with multiple formats into a fixed-length 
  151. extended operation word that is used by the OEPs in all subsequent processing.  
  152. At the conclusion of the IED stage, the prefetched bytes along with the 
  153. extended operation word issue into the instruction buffer  The IB stage 
  154. reads instructions from the 96-byte FIFO buffer and loads them into 
  155. the dual OEPs.  The FIFO effectively decouples the operation of the IFP from 
  156. the operations of the dual OEPs.
  157.  
  158. Figure 3 - The OEP Units of the 68060 (***NOT SHOWN IN ASCII-ONLY COPY***)
  159.  
  160.  
  161.         Consecutive instructions issue from the FIFO instruction buffer into 
  162. the instruction registers of the dual OEPs.  The operand execution pipelines, 
  163. known as the primary OEP (pOEP) and the secondary OEP (sOEP), are partitioned 
  164. into a 4-stage implementation depicted in Figure 3.  The four stages of the 
  165. OEPs are: Decode and Select (DS), operand Address Generation (AG), Operand 
  166. Cycle (OC) and the EXecute cycle (EX).  For instructions writing data to 
  167. memory, there are two additional pipeline stages:  the Data Available (DA) 
  168. and Store (ST) cycles.
  169.     The Decode and Select stage of the OEPs provides two primary 
  170. functions:  this stage determines the next state for the entire operand 
  171. pipeline and selects the components required for operand address calculation.  
  172. To determine the next state of the OEPs, the DS cycle logic tests the 
  173. extended operation words to ascertain the number of instructions that can 
  174. issue into the AG stage.  If multiple instructions can issue into the AG 
  175. stages in parallel, the first and second instructions move into the 
  176. respective AG stages. If only a single instruction can issue because of 
  177. architectural constraints, the first instruction issues into the pOEP, and 
  178. the DS stage evaluates the second and third instructions as a pair during 
  179. the next clock cycle.  The net effect is a sliding 2-instruction window to 
  180. examine possible pairs of instructions for parallel execution.  A dedicated 
  181. adder located in the AG stage sums the three components of the effective 
  182. address:  the base, the index and the displacement.
  183.     The Operand Cycle (OC) of the OEPs performs the actual fetch of 
  184. operands required by the instruction.  For memory operands, the OEP accesses 
  185. the data cache in this cycle to retrieve the data.  For register operands, 
  186. the OEP accesses the register file containing all the general-purpose 
  187. registers during the OC stage. At the conclusion of the OC cycle, the execute 
  188. engines receive the required operands.  The EXecute cycle (EX) performs the 
  189. operations required to complete the instruction execution including updating 
  190. the condition codes.  If the destination of the instruction is a data or an 
  191. address register, the result is available at the end of the EX stage; if 
  192. the destination is a memory location, the operation requires two additional 
  193. cycles.  First, there is a Data Available (DA) stage where the destination 
  194. operand issues to the data cache, which aligns the operand.  Second, updates 
  195. to the data cache occur during the STore (ST) cycle.  Additionally, there is 
  196. a four longword FIFO write buffer that is selectable on a page basis and 
  197. serves to decouple the operation of the OEPs from external bus cycles.
  198.     Since this is an order-two superscalar machine (dual instruction 
  199. issue), the sOEP is conceptually a copy of the pOEP.  A notable exception to 
  200. this concept is the fact that the sOEP executes only a subset of the complete 
  201. instruction set.  As an example, the floating point execute engine resides 
  202. only in the pOEP.  Consequently, all floating point instructions must execute 
  203. only the pOEP.  As instructions travel down the OEPs, they remain 
  204. lock-stepped.  This insures that there is no out-of-order execution and thus 
  205. greatly simplifies support for the precise exception model of the M68000 
  206. Family.  The micro-architecture of the 68060 supports a number of optimizations 
  207. to increase the number of superscalar instruction dispatches.  In internal 
  208. evaluations of traces from existing object code totaling several billion 
  209. instructions, 50% to 60% of instructions execute as pairs.
  210.     From the preceding discussion concerning the operand pipeline stages, 
  211. all data cache read references occur in the OC stage while data cache write 
  212. references occur in the ST stage.  The data cache uses a 4-way interleaving 
  213. scheme to allow simultaneous operand read and write operations from both 
  214. OEPs.  The data cache directories are a single-ported design.  As a result, 
  215. within a superscalar pair of instructions, the 68060 only allows a single 
  216. operand memory reference.  The data cache also supports single-cycle 
  217. references of 64-bit double-precision floating-point operands.
  218.     A common drawback to long pipelines is the penalty associated with 
  219. refilling the pipeline when a change of program flow occurs.  Condition code 
  220. evaluation occurs in the EX stage, but waiting for a branch instruction to 
  221. reach this point needlessly restricts performance.  Instead, the 68060 
  222. contains a 256-entry Branch Cache (BC) which predicts the direction of a 
  223. branch based on past execution history well in advance of the actual 
  224. evaluation of condition codes.
  225.     The BC stores the Program Counter value of change-of-flow instructions 
  226. as well as the target address of those branches.  The BC also uses some 
  227. history bits to track how each given branch instruction has executed in the 
  228. past.  The 68060 checks the BC during the IC stage of the IFP, the same stage 
  229. that performs the lookup into the Instruction Cache.  If the BC indicates that 
  230. the instruction is a branch and that this branch should be predicted as taken, 
  231. the IAG pipeline stage is updated with the target address of the branch 
  232. instead of the next sequential address.  This approach, along with the 
  233. instruction folding techniques that the BC uses, allow the 68060 to achieve a 
  234. zero-clock latency penalty for correctly predicted taken branches.
  235.     If the BC predicts a branch as not-taken, there is no discontinuity 
  236. in the instruction prefetch stream.  The IFP continues to fetch instructions 
  237. sequentially.  Eventually, the not-taken branch instruction executes as a 
  238. single-clock instruction in the OEP, so correctly predicted not-taken 
  239. branches require a single clock to execute.  These predicted as not-taken 
  240. branches allow a superscalar instruction dispatch, so in many cases, the next 
  241. instruction executes simultaneously in the sOEP.
  242.     The 68060 performs the actual condition code checking to evaluate the 
  243. branch conditions in the EX stage of the OEP.  If a branch has been 
  244. mispredicted, the 68060 discards the contents of the IFP and the OEPs, and 
  245. the 68060 resumes fetching of the instruction stream at the correct location.  
  246. To refill the pipeline in this manner, there is a seven-clock penalty for a 
  247. mispredicted branch.  If the BC correctly predicted the branch, the OEPs 
  248. execute seamlessly with no pipeline stalls.  Internal studies of the 
  249. prediction algorithm used on the 68060 show greater than 90% accuracy from 
  250. statistics gathered from several billions of instructions from applications 
  251. across many runtime environments.
  252.  
  253. Floating Point Unit
  254.  
  255.     The floating point unit (FPU) of the 68060 provides complete binary 
  256. compatibility with previous M68000 Family floating point solutions.  The 
  257. 68060 performs all internal operations in 80-bit extended precision and 
  258. completely supports the IEEE 754 floating point standard.
  259.     Conceptually, the FPU appears as another execute engine in the EX 
  260. stage of the pOEP.  A 64-bit data path between the data cache and the FPU 
  261. optimizes the FPU for single-cycle references of 32- or 64-bit memory 
  262. operands.  As previously noted, all floating point instructions must execute 
  263. through the pOEP.  However, integer instructions can be simultaneously 
  264. dispatched into the sOEP with most FPU instructions, and the 68060 supports 
  265. overlap between the integer execute engines and the FPU.  Once a multi-cycle 
  266. FPU instruction is dispatched, the pOEP and sOEP continue to dispatch and 
  267. complete integer instructions (including change-of-flow instructions) until 
  268. another FPU instruction is encountered.  At this point, the OEPs stall until 
  269. the FPU execute engine is available for the next instruction.
  270.     The FPU's internal organization consists of three units:  the adder, 
  271. the multiplier and the divider.  The 68060's design does not support 
  272. concurrent floating point execution; only one of these functional units is 
  273. active at a time.  Table 1 shows execution times for the 68060 FPU. 
  274.  
  275.         Instruction    CPU Clocks
  276.           FMOVE                1
  277.           FADD                3
  278.           FMUL                4
  279.           FDIV        24 
  280.           FSQRT               66
  281.  
  282. Table 1 - 68060 Floating Point Execution Times
  283.  
  284. Pipeline Example
  285.  
  286.     Figure 4 shows an example of the 68060 pipeline operation.  The code 
  287. shown comes from a commercially available compiler and represents the 
  288. inner SAXPY loop from the matrix300 program from the SPEC89 benchmark suite.  
  289. Since the OEPs are decoupled from the IFP, this example only focuses on 
  290. the OEPs.
  291.     This loop executes 13 instructions in only ten clock cycles, 
  292. producing a steady-state performance of 0.77 clocks per instruction (CPI).  
  293. This code includes two multi-cycle FPU instructions (4-cycle FMUL and 3-cycle 
  294. FADD), but the superscalar micro-architecture is  able to effectively exploit 
  295. the parallelism within the loop to achieve a less than one CPI measure.
  296.     This example code loop demonstrates several major architectural 
  297. features of the 68060.  Of the 13 instructions, the 68060 dispatches four 
  298. groups of 2-instruction pairs (at cycles 1, 2, 4, 5), one group of three 
  299. instructions (at cycle 9) and two individual instructions (at cycles 3 and 8).  
  300. At cycle 3, the pair of instructions being examined is {pOEP = lsl.l, 
  301. sOEP = fadd.d}.  Since all floating-point instructions must issue into the 
  302. pOEP, the fadd.d does not issue into the sOEP.  On the next cycle, a new 
  303. 2-instruction pair is examined {pOEP = fadd.d, sOEP = add.l}, and at this 
  304. time, both instructions issue down the OEPs.  At cycles 6 and 7, the pipeline 
  305. stalls on the fadd.d instruction as the 4-cycle fmul completes execution. The 
  306. floating-point store operation at cycle 8 inhibits any sOEP dispatch because 
  307. of certain post-exception fault possibilities.  At cycle 9, an instruction 
  308. triplet is dispatched {add.l, subq.l, bcc.b}.  Recall the branch cache 
  309. utilizes various instruction folding techniques that effectively allow this 
  310. predicted as taken branch to execute in 0 cycles.  Finally, at cycle 10, the 
  311. pipeline stalls for one clock on the floating-point store instruction as it 
  312. waits for the completion of the three-cycle fadd.
  313.  
  314. Power Management On Chip
  315.  
  316.     With 2.4 million transistors operating at frequencies of 50 MHz and 
  317. higher, power management becomes a crucial issue on the 68060.  From the 
  318. inception, the 68060 focused on minimizing chip-level power dissipation.  There 
  319. are primarily three different areas of interest for power dissipation.
  320.     The 68060 operates from a 3.3 volt power supply.  Since power 
  321. dissipation is a function of the square of the power supply voltage, simply 
  322. changing the power supply voltage to  3.3 volts results  in a 56%  reduction 
  323. in power compared to a 5 volt power supply.  In addition to a lower supply 
  324. voltage, the 68060 is a completely static design.  The 68060's operating 
  325. frequency, which linearly affects chip-level power dissipation, can vary 
  326. dynamically down toward the DC range.  Although the 68060 is a 3.3 volt part, 
  327. its I/O buffers interface to either 3 volt or 5 volt peripherals and memory, 
  328. facilitating upgrades of existing designs.
  329.     Sophisticated power management circuitry on chip dynamically controls 
  330. and minimizes power consumption.  This circuitry selectively updates modules 
  331. on the 68060 on a clock-by-clock basis, dynamically shuttung off the circuits 
  332. not required to support the activities in the current clock cycle.  Entire 
  333. areas of the 68060 can shut off for long periods of time when they are not 
  334. required.
  335.     The 68060 also incorporates the LPSTOP instruction.  This instruction 
  336. effectively puts the 68060 into a low-power sleep mode in which it stays until 
  337. awakened by an externally generated interrupt.  Data on previous members of the 
  338. M68000 Family shows that use of the LPSTOP instruction can extend battery 
  339. life in portable applications by over 250%.
  340.  
  341. Summary
  342.  
  343.     The 68060 relies on new as well as standard architectural techniques 
  344. to extend the performance of the M68000 Family product line.  Performance 
  345. simulations predict that between 3 and 3.5 times a 25 MHz 68040 are possible 
  346. using existing  object code.
  347.     The 68060 relies on a deep internal pipeline and a superscalar 
  348. internal architecture coupled with 8 Kbyte instruction and data caches, a 
  349. 256-entry branch cache, on-chip MMUs and an on-chip FPU to bring new levels 
  350. of performance to the M68000 Family architecture.
  351.     Power management is very important on the 68060, and this design uses 
  352. dynamic power management techniques to minimize power consumption.  The 68060 
  353. operates from a 3.3 volt power supply, which greatly reduces its power 
  354. dissipation.  Although the 68060 operates at a lower operating voltage, it 
  355. interfaces to both 3 volt and 5 volt peripherals and logic.
  356.     In addition to providing full application object code compatibility 
  357. with previous CPUs in this family, the 68060 provides a superset of 68040 
  358. hardware functionality.  Designs compatible with existing and future 68040 
  359. systems are simple, and higher frequency designs are possible using a new 
  360. bus interface protocol.
  361.  
  362. Acknowledgements
  363.  
  364.     The authors would like to thank all members of the 68060 design team 
  365. and management  Without their concerted team effort, this project and this 
  366. paper would not have been possible.
  367.  
  368.  
  369. References
  370.  
  371. Bernal, R.D. and Circello, J.C., "Putting RISC Efficiency To Work in CISC 
  372. Architectures," VLSI Systems Design, September 1987, pp. 46-51.
  373.  
  374. Circello, J.C. et al, "Refined Method Brings Precision to Performance 
  375. Analysis," Computer Design, March 1, 1989,   pp. 77-82.
  376.  
  377. Edenfield, R.W. et al, "The 68040 Processor, Part 1, Design and 
  378. Implementation," IEEE MICRO, February 1990, pp. 66-78.
  379.  
  380. Diefendorff, K. and Allen, M., "Organization of the Motorola 88110 
  381. Superscalar RISC Microprocessor," IEEE MICRO, April 1992, pp. 40-63.
  382.  
  383. Hennessy, J. and Patterson, D., "Computer Architecture: A Quantitative 
  384. Approach,"  Morgan Kaufmann Publishers, Inc., San Mateo, CA, 1990.
  385.   
  386.